package cn.infinite.security.core;

import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.userdetails.UserDetails;

/**
 * 短信认证接口
 */
public interface SmsAuthenticateAble {

    /**
     * 根据手机号和短信验证码 验证用户
     * @param mobile 手机号
     * @param smsCode 短信验证码
     * @return 验证成功 后返回用户
     * @throws AuthenticationException
     */
    UserDetails smsAuthenticate(String mobile, String smsCode) throws AuthenticationException;

}
